<?php
@include('include/common.inc.php');	
$id = $_GET['id'];	
$sel = "select * from $TBL_HOUSE where id=$id";
$res=$db->query($sel);
$rows  = mysql_fetch_array($res); 	

$sel_lease = "select * from $TBL_LEASE where hou_num=".$rows['num'];	
$res_lease = mysql_query($sel_lease);
$rows_lease = @mysql_fetch_array($res_lease);

$sel_store = "select * from $TBL_STORE where id=".$rows_lease['store'];	
$res_store = mysql_query($sel_store);
$rows_store = @mysql_fetch_array($res_store);

$row[]=$rows ;

$NEWS_ID =$id; 
if($rows['img']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img'];
	$img = "<img src='$file' width='110' /><br>";
}
if($rows['img1']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img1'];
	$img1 = "<img src='$file' width='110' /><br>";
}
if($rows['img2']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img2'];
	$img2 = "<img src='$file' width='110' /><br>";
}
if($rows['img3']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img3'];
	$img3 = "<img src='$file' width='110' /><br>";
}
if($rows['img4']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img4'];
	$img4 = "<img src='$file' width='110' /><br>";
}
if($rows['img5']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img5'];
	$img5 = "<img src='$file' width='110' /><br>";
}
if($rows['img6']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img6'];
	$img6 = "<img src='$file' width='110' /><br>";
}
if($rows['img7']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img7'];
	$img7 = "<img src='$file' width='110' /><br>";
}
if($rows['img8']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img8'];
	$img8 = "<img src='$file' width='110' /><br>";
}
if($rows['img9']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img9'];
	$img9 = "<img src='$file' width='110' /><br>";
}
if($rows['img10']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img10'];
	$img10 = "<img src='$file' width='110' /><br>";
}
if($rows['img11']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img11'];
	$img11 = "<img src='$file' width='110' /><br>";
}
if($rows['img12']!='')
{
	$file ='siteadmin/upload/house/'.$NEWS_ID."/".$rows['img12'];
	$img12 = "<img src='$file' width='110' /><br>";
}

  $selfd = "select * from $TBL_STORE order by id asc"; //分店
  $resultfd = mysql_query($selfd);
  while($rowfd = mysql_fetch_array($resultfd))
  {
		if($rowfd[id]==$rows[store])
		{
			$selected = "selected";
		}else{
			$selected = '';
		}
		$fd  =$fd."<option value=$rowfd[id]  $selected >$rowfd[name]</option>";
  }

@include_once("xuanxiang.php");

$smarty->assign("img",$img);
$smarty->assign("img1",$img1);
$smarty->assign("img2",$img2);
$smarty->assign("img3",$img3);
$smarty->assign("img4",$img4);
$smarty->assign("img5",$img5);
$smarty->assign("img6",$img6);
$smarty->assign("img7",$img7);
$smarty->assign("img8",$img8);
$smarty->assign("img9",$img9);
$smarty->assign("img10",$img10);
$smarty->assign("img11",$img11);
$smarty->assign("img12",$img12);

$smarty->assign("edit",$edit);
$smarty->assign("fd",$fd);

$smarty->assign("lease_id",$rows_lease['id']);
$smarty->assign("lease_time",$rows_lease['addtime']);
$smarty->assign("admin_name",$rows_lease['admin_name']);
$smarty->assign("state",$rows_lease['state']);

$smarty->assign("store_name",$rows_store['name']);

$smarty->assign("row",$row);
@include('number.php');//验证码
$smarty->display('admin_info.html');
?>